package com.qf.agro.controller;

import com.qf.agro.common.ResultInfo;
import com.qf.agro.service.DeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 10202
 * @version V1.0
 * @Project smart-agriculture-parent
 * @Package com.qf.agro.controller
 * @Date 2023/7/5 22:03
 */
@RestController
@RequestMapping("device/device")
public class DeviceDeviceController {

    @Autowired
    private DeviceService deviceService;
    @GetMapping("page")
    public ResultInfo getdevicePage(@RequestParam(value = "page",defaultValue = "1")Integer pageNum, @RequestParam(defaultValue = "5")Integer pageSize, Long facilitiesId,String name){
      return   deviceService.getPage(pageNum,pageSize,facilitiesId,name);
    }
}
